package com.biz.primus.ms.commodity.dao.po;


import com.biz.primus.ms.base.jpa.po.BaseEntity;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by jiangnan on 2017/6/24.
 * 盒子商品,属于商品盒子中的子项
 */
@Data
@Entity
@Table(name = "pro_box_product")
public class BoxProduct extends BaseEntity implements Serializable {

    @OneToOne
    @JoinColumn(nullable = false,name = "product_id")
    private Product product;

    /**
     * 盒子商品排序
     */
    @Column
    private Integer sort;

    @ManyToOne
    @JoinColumn(name = "product_box_id")
    private ProductBox productBox;

}
